﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using L2Script.Packets.Game;
using L2Script.Library;

namespace L2Script.Plugins.R4Toolkit.InformationExtension.Packets
{
    public static class CharInfo
    {
        public static Character parsePacket(GameReader packet)
        {
            Character toon = new Character();
            toon.X = packet.readD();
            toon.Y = packet.readD();
            toon.Z = packet.readD();
            packet.readD();
            toon.ObjectID = packet.readD();
            toon.Name = packet.readS();
            toon.Race = packet.readD();
            toon.Sex = packet.readD();
            toon.ClassID = packet.readD();
            toon.IDUnder = packet.readD();
            toon.IDHead = packet.readD();
            toon.IDRhand = packet.readD();
            toon.IDLhand = packet.readD();
            toon.IDGloves = packet.readD();
            toon.IDChest = packet.readD();
            toon.IDLegs = packet.readD();
            toon.IDFeet = packet.readD();
            toon.IDBack = packet.readD();
            toon.IDLrhand = packet.readD();
            toon.IDHair = packet.readD();
            toon.IDHair2 = packet.readD();
            toon.IDRbracelet = packet.readD();
            toon.IDLbracelet = packet.readD();
            toon.IDDeco = packet.readD();
            toon.IDDeco2 = packet.readD();
            toon.IDDeco3 = packet.readD();
            toon.IDDeco4 = packet.readD();
            toon.IDDeco5 = packet.readD();
            toon.IDDeco6 = packet.readD();
            toon.IDBelt = packet.readD();
            toon.AugIDUnder = packet.readD();
            toon.AugIDHead = packet.readD();
            toon.AugIDRhand = packet.readD();
            toon.AugIDLhand = packet.readD();
            toon.AugIDGloves = packet.readD();
            toon.AugIDChest = packet.readD();
            toon.AugIDLegs = packet.readD();
            toon.AugIDFeet = packet.readD();
            toon.AugIDBack = packet.readD();
            toon.AugIDLrhand = packet.readD();
            toon.AugIDHair = packet.readD();
            toon.AugIDHair2 = packet.readD();
            toon.AugIDRbracelet = packet.readD();
            toon.AugIDLbracelet = packet.readD();
            toon.AugIDDeco = packet.readD();
            toon.AugIDDeco2 = packet.readD();
            toon.AugIDDeco3 = packet.readD();
            toon.AugIDDeco4 = packet.readD();
            toon.AugIDDeco5 = packet.readD();
            toon.AugIDDeco6 = packet.readD();
            toon.AugIDBelt = packet.readD();
            packet.readD();
            packet.readD();
            toon.PvPFlag = packet.readD();
            toon.Karma = packet.readD();
            toon.MatkSpd = packet.readD();
            toon.PatkSpd = packet.readD();
            toon.PvPFlag = packet.readD();
            toon.Karma = packet.readD();
            toon.RunSpd = packet.readD();
            toon.WalkSpd = packet.readD();
            toon.SwimRunSpd = packet.readD();
            toon.SwimWalkSpd = packet.readD();
            toon.RunSpd = packet.readD();
            toon.WalkSpd = packet.readD();
            toon.FlyRunSpd = packet.readD();
            toon.FlyWalkSpd = packet.readD();
            toon.MoveMul = packet.readF();
            toon.AtkSpeedMul = packet.readF();
            toon.ColRadius = packet.readF();
            toon.ColHeight = packet.readF();
            toon.HairStyle = packet.readD();
            toon.HairColor = packet.readD();
            toon.Face = packet.readD();
            toon.Title = packet.readS();
            toon.ClanID = packet.readD();
            toon.ClanCrestID = packet.readD();
            toon.AllyID = packet.readD();
            toon.AllyCrestID = packet.readD();
            packet.readD();
            toon.isSitting = packet.readC();
            toon.isRunning = packet.readC();
            toon.isInCombat = packet.readC();
            toon.isAlikeDead = packet.readC();
            toon.Invisible = packet.readC();
            toon.MountType = packet.readC();
            toon.PrivateStoreType = packet.readC();
            toon.CubicsSize = packet.readH();
            toon.CubicID = packet.readH();
            packet.readC();
            toon.AbnormalEffect = packet.readD();
            toon.RecomLeft = packet.readC();
            toon.RecomHave = packet.readH();
            toon.MountNpcID = packet.readD();
            toon.ClassID = packet.readD();
            packet.readD();
            toon.isMounted = packet.readC();
            toon.Team = packet.readC();
            toon.ClanCrestLargeID = packet.readD();
            toon.isNoble = packet.readC();
            toon.isHero = packet.readC();
            toon.isFishing = packet.readC();
            toon.FishingX = packet.readD();
            toon.FishingY = packet.readD();
            toon.FishingZ = packet.readD();
            toon.NameColor = packet.readD();
            toon.Heading = packet.readD();
            toon.PledgeClass = packet.readD();
            toon.PledgeType = packet.readD();
            toon.TitleColor = packet.readD();
            toon.CursedWeaponEquipID = packet.readD();
            toon.ReputationScore = packet.readD();
            toon.TranformationID = packet.readD();
            toon.AgathionId = packet.readD();
            return toon;
        }
    }
}